<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>办卡用户</title>
        <link href="/zhenze/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/zhenze/Public/admin/js/jquery.js"></script>
        <script type="text/javascript" src="/zhenze/Public/My97DatePicker/WdatePicker.js"></script>
    </head>

    <body>
        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li><a href="<?php echo U('index/welcome');?>">首页</a></li>
                <li><a href="###">办卡用户</a></li>
            </ul>
        </div> 
        <div class="formbody"> 
            <form name="seachform" id="seachform" action="<?php echo U('user/opencard');?>" method="post">
                <ul class="seachform">

                    <li><input style='width:80px;' placeholder="用户名" name="nickname"  value="<?=I('nickname')?>" type="text" class="scinput" /></li>		
                    <li><input style='width:80px;' placeholder="卡号" name="new_card"  value="<?=I('new_card')?>" type="text" class="scinput" /></li>	 
                    <li><input style='width:80px;' placeholder="套餐" name="setmeal"  value="<?=I('setmeal')?>" type="text" class="scinput" /></li>	 
                    <li><label></label><input placeholder="起始时间" name="start_time" id="starttime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围开始值不能为空！" maxlength="20" style="width: 170px;" readonly value="<?=I('start_time')?>" /></li>
                    <li><label></label><input placeholder="截止时间" name="end_time" id="endtime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围结束值范围不能为空！" maxlength="20" style="width: 170px;" readonly value="<?=I('end_time')?>" /></li>
                    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
                </ul>
            </form>

            <form action="<?=U('user/batchgroup')?>" method="post">
                <table class="tablelist">
                    <thead>
                        <tr>  
                            <th>用户</th> 
                            <th>卡号</th>
                            <th>套餐</th> 
                            <th>开卡时间</th> 
                            <th>代理人</th>  
                        </tr>
                    </thead>
                    <tbody>
                        <?php if(is_array($dataList)): $i = 0; $__LIST__ = $dataList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?><tr>  
                                <td><?= $value['nickname']?></td> 
                                <td><?= $value['new_mobile']?></td> 
                                <td><?= $value['set_title']?></td>   
                                <td><?= date('Y-m-d H:i:s',$value['open_time'])?></td>  
                                <td><?= $value['agent']?></td>   
                            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                    </tbody>
                </table>

                <?php echo ($pageshow); ?>

            </form>
        </div>
        <script type="text/javascript">
            $('.tablelist tbody tr:odd').addClass('odd');
            $(function () {
                $("#chkAll").click(function () {
                    var flag = $("#chkAll").prop("checked");
                    $("[id^='checkbox']").each(function () {
                        $(this).prop("checked", flag);
                    });
                });

                var isd = '';
                //如果全部项都勾上了，则全部选项也被选上， 选项中有一项取消了，则全选框也会自动取消。
                $("[id^='checkbox']").each(function () {
                    $(this).click(function () {
                        if ($("[id^='checkbox']:checked").length == $("[id^='checkbox']").length) {
                            $("#chkAll").prop("checked", "checked");
                        } else {
                            $('#chkAll').removeAttr("checked");
                        }
                    });
                });
            })
        </script>
    </body>

</html>